import React, { Component } from 'react'
import Form from './components/Form'
import Test from "./components/Select/Test"
export default class App extends Component {
  state = {
    val:''
  }
  render() {
    return (
      <Form >
        {/* 默认情况下非受控组件 一旦设置了value属性则变为受控组件 */}
          <input type='text'  value={this.state.val} onChange={
            (e)=>{
              this.setState({
                val:e.target.value
              })
            }
          }/>
          <button onClick={
            ()=>{
              console.log(this.state.val)
            }
          }>获取输入的值</button>
          <Test />
        </Form>
    )
  }
}
